﻿@model IEnumerable<Senac.Escola.Projeto.Models.Aluno>

@{
    ViewBag.Title = "Index";
}

<h2>ALUNO</h2>


<table class="table">
    <tr>
        <th>
            Nome
        </th>
        <th>
            Nivel
        </th>
        <th>
            Usuario
        </th>
        <th>
            Categoria
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nome)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nivel)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Usuario.Login)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Categoria.Nome)
        </td>
        <td>
        <div class="btn">
            @Html.ActionLink("Editar", "Edit", new { id=item.AlunoID })
        </div>
        <div class="btn">
            @Html.ActionLink("Deletar", "Delete", new { id=item.AlunoID })
        </div>
        </td>
    </tr>
}

</table>
<p><p></p>
<div class="btn btn-danger">
    @Html.ActionLink("Criar novo aluno", "Create")
</div>
</p>